* Save data of model with no global firms for Figures 8 and 9
* Source data "microdata_NGF" is generated by Replicate_2.m in MATLAB
import delimited using "QuantitativeModel/temp/microdata_NGF", clear

ren v1 omega
ren v2 omega1
ren v3 sD
ren v4 sD1
ren v5 sX

gen sI = 1-sD 
gen growth = (omega1-omega)/omega * 100
gen sDgrowth = (sD1-sD)/sD*100

* Save data:
binscatter growth sI if sI>0, n(80) xtitle(Initial Import Share) ytitle(Market Share Growth) graphregion(color(white)) line(qfit) savedata("QuantitativeModel/temp/F8_ngf") replace
binscatter sDgrowth sX if sX>0, n(20) xtitle(Initial Export Share) ytitle(Domestic Share Growth) title(Uncorrelated Model) graphregion(color(white)) savedata("QuantitativeModel/temp/F9_ngf") replace
